#include "Data/Objects/Action.h"

namespace data {

	Action StringToAction( const std::string& string ) {
		if( string == "StartLeftRotation" )
			return Action::StartLeftRotation;
		if( string == "StopLeftRotation" )
			return Action::StopLeftRotation;
		if( string == "StartRightRotation" )
			return Action::StartRightRotation;
		if( string == "StopRightRotation" )
			return Action::StopRightRotation;
		if( string == "WatchCursor" )
			return Action::WatchCursor;
		if( string == "Grab" )
			return Action::Grab;
		if( string == "UnknownAction" )
			return Action::UnknownAction;
		return Action::UnknownAction;
	}

	std::string ActionToString( const Action& action ) {
		if( action == Action::StartLeftRotation )
			return "StartLeftRotation";
		if( action == Action::StopLeftRotation )
			return "StopLeftRotation";
		if( action == Action::StartRightRotation )
			return "StartRightRotation";
		if( action == Action::StopRightRotation )
			return "StopRightRotation";
		if( action == Action::WatchCursor )
			return "WatchCursor";
		if( action == Action::Grab )
			return "Grab";
		if( action == Action::UnknownAction )
			return "UnknownAction";
		return "UnknownAction";
	}
}
